package vtc;

import java.util.concurrent.*;
import java.io.*;

// One single input queue and one single output queue

abstract class InputUnit extends VtcUnit 
{
	protected VtcTimeTaggedEvent outValue_;
	
	InputUnit(String id, VtcArrayBlockingQueue outQueues[]) 
	{
		//dummy input queue
		super(id, null, outQueues);
	}
	
	abstract public VtcTimeTaggedEvent inputProcess() throws InterruptedException;
		
	public void process() throws InterruptedException
	{
		outValue_ = this.inputProcess();
		outQueues_[0].forcePut(outValue_);
	}
}